home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr05 / xnot12a.zip / VERSION.C < prev    next >
C/C++ Source or Header  |  1993-06-11  |  1KB  |  73 lines

  1. #include "jam.h"
  2. #include "def.h"
  3.  
  4. /*
  5.  * This file contains the string that gets written
  6.  * out by the emacs-version command.
  7.  */
  8. #ifdef MSW
  9. # define VSTRING
  10.   static char *emacsversion = "1.2a for Windows: (based on MG2a)";
  11. #endif
  12.  
  13. #ifdef X11
  14. # define VSTRING
  15.   static char *emacsversion = "1.2a for X11: (based on MG2a)";
  16. #endif
  17.  
  18. #ifndef WINDOWED
  19. # define VSTRING
  20.   static char *emacsversion = "1.2a: based on MG2a";
  21. #endif
  22.  
  23. #ifndef VSTRING
  24.   static char *emacsversion = "1.2a for Unix/curses- (based on MG2a)";
  25. #endif
  26.  
  27. #ifdef __DATE__
  28.   char sdate[] = ", "__DATE__;
  29. #else
  30.   char sdate[] = " approx. June 11, 1993";
  31. #endif
  32.  
  33. /*
  34.  * Display the version. All this does
  35.  * is copy the version string onto the echo line.
  36.  */
  37. /*ARGSUSED*/
  38. showversion(f, n)
  39. int f, n;
  40. {
  41.   char str[NLINE];
  42.  
  43.   strcpy(str, getversion());
  44.   strcat(str, sdate);
  45.   ewprintf(str);
  46.   return TRUE;
  47. }
  48. char *getversion()
  49. {
  50.   static char buf[NLINE];
  51.  
  52.   strcpy(buf, g_APPNAME);
  53.   strcat(buf, " ");
  54.   strcat(buf, emacsversion);
  55.   return (buf);
  56. }
  57.  
  58. char *shortversion()
  59. {
  60.   static char stuff[20] = {0};
  61.   int i;
  62.  
  63.   if (stuff[0] == 0)
  64.     for (i = 0; ; i++)
  65.       {
  66.         stuff[i] = emacsversion[i];
  67.         if (emacsversion[i] == ' ')
  68.           break;
  69.       }
  70.  
  71.   return(stuff);
  72. }    
  73.